//
//  House.swift
//  xiaoqiao
//
//  Created by 冷子豪 on 2017/7/31.
//  Copyright © 2017年 冷子豪. All rights reserved.
//

import UIKit

var arrayHouse = [House]()

class House {
    /// 房产id
    var id:Int?
    /// 用户ID
    var userid:Int?
    /// 房产证编号
    var numOfCertificate:String?
    /// 房产估值
    var price:Double?
    /// 年限
    var yearsOfHouse:Int?
    /// 市价
    var marketValue:Int?
    /// 周边价格
    var valueOfArround:Int?
    /// 所在城市
    var cityOfHouse:String?
    /// 房产性质
    var houseType:String?
    /// 按揭月供
    var payment:Double?
    /// 详细地址
    var address:String?
    /// 面积
    var area:Double?
    /// 状态
    var status:String?
    /// 创建时间
    var createtime:Date?
    /// 更新时间
    var updatetime:Date?
    
    /// 默认构造方法
    init(){
        
    }
    
    /// 自定义构造函数,会覆盖init()函数
    ///
    /// - Parameter dic:
    init(dic : [String : Any]) {
        
        id = dic["id"] as? Int
        userid = dic["userid"] as? Int
        numOfCertificate = dic["numofcertificate"] as? String
        price = dic["price"] as? Double
        //                    yearsOfHouse =
        //                    marketValue =
        //                    valueOfArround =
        cityOfHouse = dic["cityofhouse"] as? String
        houseType = dic["housetype"] as? String
        payment = dic["payment"] as? Double
        address = dic["address"] as? String
        area = dic["area"] as? Double
        status = dic["status"] as? String
        
    }
}
